<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户展示</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="webjars/jquery/3.5.0/jquery.js"></script>
    <script type="text/javascript" th:inline="javascript">

        /*<![CDATA[*/

        // function isDel(){
        //
        //     return alert("是否删除");
        // }


        /*]]>*/
    </script>
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">

            <a class="navbar-brand" href="#">数据集的查询系统后台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li class="active"><a th:href="@{/user/listU}">用户管理<span class="sr-only">(current)</span></a></li>
                <li><a th:href="@{/user/book/listB}">书籍管理</a></li>
                <li><a th:href="@{/user/coursera/listC}">课程管理</a></li>
                <li><a th:href="@{/select}">资源获取</a></li>
                <li><a th:href="@{/}">返回首页</a></li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="sub-header">用户管理</h2>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>序号：</th>
                        <th>姓名：</th>
                        <th>密码：</th>
                        <th>电话：</th>
                        <th>状态码：</th>
                        <th>操作:</th>
                        <th>操作:</th>
                    </tr>
                    </thead>
                    <tbody th:each="user:${userList}">
                    <tr>
                        <td><span th:text="${user.getId()}"/></td>
                        <td><span id="user_name" th:text="${user.getName()}"/></td>
                        <td><span th:text="${user.getPassword()}"/></td>
                        <td><span th:text="${user.getPhone()}"/></td>
                        <td><span th:text="${user.getStatus()}"/></td>
                        <td><button type="button" class="btn btn-success"><a style="color: black" th:href="@{'update/'+${user.getId()}}">编辑</a></button></td>
                        <td><button type="button" class="btn btn-danger"><a style="color: black" th:href="@{'delete/'+${user.getId()}}" onclick="return confirm('确定将此记录删除?')">删除</a></button></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
                <!--<table>-->
                <!--    <tr>-->
                <!--        <th>序号：</th>-->

                <!--        <th>姓名：</th>-->
                <!--        <th>密码：</th>-->
                <!--        <th>电话：</th>-->
                <!--        <th>操作:</th>-->
                <!--    </tr>-->

                <!--    <tr th:each="user:${userList}">-->
                <!--        <td>-->
                <!--            <span th:text="${user.getId()}"/>-->
                <!--        </td>-->
                <!--        <td>-->
                <!--            <span th:text="${user.getName()}"/>-->
                <!--        </td>-->
                <!--        <td>-->
                <!--            <span th:text="${user.getPassword()}"/>-->
                <!--        </td>-->
                <!--        <td>-->
                <!--            <span th:text="${user.getPhone()}"/>-->
                <!--        </td>-->

                <!--        <td>-->
                <!--&lt;!&ndash;            th:onclick="'javascript:del('+${user.getName()}+');'"&ndash;&gt;-->
                <!--            <a th:href="@{'update/'+${user.getId()}}">编辑</a>-->
                <!--        </td>-->
                <!--        <td>-->
                <!--            <a th:href="@{'delete/'+${user.getId()}}" >删除</a>-->
                <!--        </td>-->

                <!--    </tr>-->


                <!--</table>-->

</body>
</html>
